package com.zy.response;


/**
 * Created by zhaoyang on 2019/6/20.
 */
public class CommonReturnType {
    private String status;

    private Object data;

    public static CommonReturnType createSuccess(Object data) {
        return  createSuccess(data,"success");
    }

    public static CommonReturnType createFail(Object data) {
       return  createSuccess(data,"fail");
    }

    private static CommonReturnType createSuccess(Object data,String status) {
        CommonReturnType commonReturnType = new CommonReturnType();
        commonReturnType.setStatus(status);
        commonReturnType.setData(data);
        return commonReturnType;
    }

    public String getStatus() {
        return status;
    }

    private void setStatus(String status) {
        this.status = status;
    }

    public Object getData() {
        return data;
    }

    private void setData(Object data) {
        this.data = data;
    }
}
